package com.emergency.db.domain.item;

import com.emergency.base.domain.BaseEntity;
import com.emergency.db.domain.staff.Staff;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.io.Serializable;

//设备配置人员表
@Entity
@Table(name = "bas_item_user")
public class ItemUser extends BaseEntity {
    @JsonIgnore
    @OneToOne(targetEntity = Item.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "item_id", referencedColumnName = "id")
    private Item item;

    @OneToOne(targetEntity = Staff.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "staff_id", referencedColumnName = "id")
    private Staff staff;

    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }
}
